package com.xhl.doeverything.service;

import com.xhl.doeverything.dto.UserRequest;
import com.xhl.doeverything.entity.PageQueryCondition;
import com.xhl.doeverything.entity.PageQueryResult;
import com.xhl.doeverything.entity.UserDO;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author xionghuilong
 * @description: 用户服务
 * @date 2022/1/21 14:36
 */
public interface UserService {
    /**
     * 用户列表查询
     * @param request 入参
     * @return 出参
     */
    List<UserDO> queryUserList(@RequestBody UserRequest request);

    /**
     * 用户信息入库
     * @param request 入参
     */
    int addUser(@RequestBody UserRequest request);
    int addUserWithIndex(@RequestBody UserRequest request);

    int updateUser(@RequestBody UserRequest request);

    int deleteUser(@RequestBody String name);

    /**
     * 分页查询
     * @param request
     * @return
     */
    PageQueryResult<UserDO> queryPage(@RequestBody PageQueryCondition<UserRequest> request);

    /**
     * es分页查询
     * @param request
     * @return
     */
    PageQueryResult<UserDO> esQueryPage(@RequestBody PageQueryCondition<UserRequest> request);
}
